<?php /*a:2:{s:93:"D:\phpstudy_pro\WWW\22php\22zhengmaotong\public/themes/admin_simpleboot3/zmt\goods\index.html";i:1718607812;s:91:"D:\phpstudy_pro\WWW\22php\22zhengmaotong\public/themes/admin_simpleboot3/public\header.html";i:1690974980;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->


    <link href="/themes/admin_simpleboot3/public/assets/themes/<?php echo cmf_get_admin_style(); ?>/bootstrap.min.css" rel="stylesheet">
    <link href="/themes/admin_simpleboot3/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        form .input-order {
            margin-bottom: 0px;
            padding: 0 2px;
            width: 42px;
            font-size: 12px;
        }

        form .input-order:focus {
            outline: none;
        }

        .table-actions {
            margin-top: 5px;
            margin-bottom: 5px;
            padding: 0px;
        }

        .table-list {
            margin-bottom: 0px;
        }

        .form-required {
            color: red;
        }

        .td-actions .btn {
            margin-bottom: 2px;
            min-width: 96px;
            text-align: center;
        }

        .td-actions .btn:last-child {
            margin-bottom: 0;
        }
        a:hover, a:focus{
            text-decoration: none;
        }
    </style>
    <?php 
		$is_mobile=cmf_is_mobile();
        $_static_version='1.0.4';
        $cmf_version=cmf_version();
        if (strpos(cmf_version(), '6.') === 0) {
            $_app=app()->http->getName();
        }else{
            $_app=request()->module();
        }
     ?>
    <script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "/",
            WEB_ROOT: "/",
            JS_ROOT: "static/js/",
            APP: '<?php echo $_app; ?>'/*当前应用名*/,
            IS_MOBILE: <?php echo !empty($is_mobile) ? 'true'  :  'false'; ?>
        };
    </script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-1.12.4.min.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-migrate-1.4.1.min.js"></script>
<!--    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-3.6.0.min.js"></script>-->
    <script src="/static/js/wind.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/bootstrap.min.js"></script>
    <script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container: 'body',
                html: true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
    </script>
    <?php if(APP_DEBUG): ?>
        <style>
            #think_page_trace_open {
                z-index: 9999;
            }
        </style>
    <?php endif; ?>

</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="<?php echo url('Goods/index'); ?>">商品信息首页</a></li>
        <li><a href="<?php echo url('Goods/add'); ?>">添加商品</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="get" action="<?php echo url('Goods/index'); ?>">
        <input type="text" class="form-control" name="name" style="width: 200px;" value="<?php echo input('request.name/s',''); ?>" placeholder="请输入商品名称">
        <input type="submit" class="btn btn-primary" value="搜索" />
        <a class="btn btn-danger" href="<?php echo url('Goods/index'); ?>">清空</a>
    </form>
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>ID</th>
            <th>商品名称</th>
            <th>封面</th>
            <th>图集</th>
            <th>分类id</th>
            <th>状态</th>
            <th>自营</th>
            <th>运费</th>
            <th>发表时间</th>
            <th>修改时间</th>
            <th>操作</th>
        </tr>
        </thead>

        <tbody>
        <?php if(is_array($list) || $list instanceof \think\Collection || $list instanceof \think\Paginator): if( count($list)==0 ) : echo "" ;else: foreach($list as $key=>$vo): ?>
            <tr>
                <td><?php echo $vo['id']; ?></td>
                <td><?php echo $vo['name']; ?></td>
                <td><img class="img-thumbnail js-image-previewer" src="/upload/<?php echo $vo['image']; ?>" style="width: 40px"></td>
                <td>
                    <?php if(is_array($vo['photos']) || $vo['photos'] instanceof \think\Collection || $vo['photos'] instanceof \think\Paginator): if( count($vo['photos'])==0 ) : echo "" ;else: foreach($vo['photos'] as $key=>$v): ?>
                        <img class="img-thumbnail js-image-previewer" src="/upload/<?php echo $v; ?>" style="width: 40px">
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </td>
                <td><?php echo $vo['gid']; ?></td>
                <td>
                    <?php switch($vo['status']): case "1": ?>
                            <span class="btn btn-success btn-xs">正常</span>
                        <?php break; case "2": ?>
                            <span class="btn btn-warning btn-xs">下架</span>
                        <?php break; case "0": ?>
                            <span class="btn btn-danger btn-xs">无货</span>
                        <?php break; ?>
                    <?php endswitch; ?>
                </td>
                <td>
                    <?php switch($vo['support']): case "1": ?>
                            <a href="<?php echo url('Goods/isShow',array('id'=>$vo['id'])); ?>" class="js-ajax-dialog-btn" data-msg="确定不是自营吗？">
                                <span class="btn btn-success btn-xs" >是</span>
                            </a>
                        <?php break; case "0": ?>
                            <a href="<?php echo url('Goods/isShow',array('id'=>$vo['id'])); ?>" class="js-ajax-dialog-btn" data-msg="确定是自营吗？">
                                <span class="btn btn-success btn-danger btn-xs" >否</span>
                            </a>
                        <?php break; ?>
                    <?php endswitch; ?>
                </td>
                <td><?php echo $vo['money']; ?></td>
                <td><?php echo date("Y-m-d H:i:s",!is_numeric($vo['create_time'])? strtotime($vo['create_time']) : $vo['create_time']); ?></td>
                <td><?php echo date("Y-m-d H:i:s",!is_numeric($vo['update_time'])? strtotime($vo['update_time']) : $vo['update_time']); ?></td>
                <td>
                    <div class="btn-group" role="group">
                        <button type="button" class="btn btn-default btn-xs dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            商品配置<span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="javascript:void(0);" onclick="openIframeLayer('setGoodsAttr?goods_id=<?php echo $vo['id']; ?>','配置商品属性',{area:['60%','80%']})">配置属性</a>
                            </li>
                            <li>
                                <a href="javascript:void(0);" onclick="openIframeLayer('setGoodsAttrValue?goods_id=<?php echo $vo['id']; ?>','配置商品属性值',{area:['60%','80%']})">配置属性值</a>
                            </li>
                        </ul>
                    </div>
                    <a class="btn btn-xs btn-primary" title="<?php echo lang('EDIT'); ?>" data-toggle="tooltip" href="<?php echo url('Goods/edit'); ?>?id=<?php echo $vo['id']; ?>">
                        <i class="fa fa-edit fa-fw"></i>
                    </a>
                    <a href="<?php echo url('Goods/delete',array('id'=>$vo['id'])); ?>" class="js-ajax-delete btn btn-xs btn-danger" data-msg="确定删除它吗？">
                        <i class="fa fa-trash fa-fw"></i>
                    </a>
                </td>
            </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
        </tbody>
    </table>
</div>
<div>
    共有<?php echo $list->total(); ?>条数据，每页显示<?php echo $list->listRows(); ?>条，当前第<?php echo $list->currentPage(); ?>页，共<?php echo $list->lastPage(); ?>页
</div>
<div class="pagination"><?php echo $list->render(); ?></div>
</form>
</div>
<script src="/static/js/admin.js"></script>
<script src="/static/js/js-image-previewer.js"></script>

</body>
</html>
